<template>
 <div>
    <h2>我是Home的内容</h2>
    <ul>
      <li><router-link to="/home/news" active-class="active">News</router-link></li>
      <li><router-link to="/home/message" active-class="active">Message</router-link></li>
    </ul>
    <router-view></router-view>
 </div>
</template>

<script>
export default {
  name: 'Home',
  data() {
   return {
     
   }
  },
  mounted() {
    console.log('Home组件挂载完毕了', this)
    window.homeRoute = this.$route
    window.homeRouter = this.$router
    // aboutRoute === homeRoute false  
    // aboutRouter === homeRouter true
  },
  beforeDestroy() {
    console.log('Home组件即将被销毁了')
  },
}
</script>
